<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div id="app">
    {{info.name}}
</div>
<!--导入vue.js-->
<script src="https://cdn.jsdelivr.net/npm/vue@2.5.16/dist/vue.min.js"></script>
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
<script>
  var vm=new Vue({
    el: "#app",
      data(){
        return{
            // 请求的返回参数合适，必须和json字符串所设置的一样
            info:{
                name: null,
                address: {
                    street: null,
                    city: null,
                    country: null
                },
                url: null
            }
        }
      },
      //钩子函数 链式编程 ES6新特性
      mounted(){
        axios.get('../data.json').then(Response=>(this.info=Response.data));

      }
  });
</script>
</body>
</html>